package com.dtease.agent.biz.resource.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dtease.agent.biz.resource.entity.BasClusterService;
import com.dtease.agent.biz.resource.mapper.BasClusterServiceMapper;
import com.dtease.agent.biz.resource.service.IBasClusterServiceService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 集群服务配置信息 服务实现类
 * </p>
 *
 * @author chentl
 * @since 2025-05-07
 */
@DS("resource")
@Service
public class BasClusterServiceServiceImpl extends ServiceImpl<BasClusterServiceMapper, BasClusterService> implements IBasClusterServiceService {

    public static final String HIVE = "Hive";

    @Override
    public List<BasClusterService> selectByClusterId(String clusterId) {
        List<BasClusterService> clusterServices = this.lambdaQuery()
                .eq(BasClusterService::getClusterId,clusterId)
                .eq(BasClusterService::getServiceCode, HIVE)
                .list();
        return clusterServices;
    }
}
